// 查看影像的模块标志
export const DCM_MODULE_FLAG_MAP = {
  chakan: 1, // 只查看
  zhikong: 2, // 质控阅片
  fangshi: 3, // 访视阅片
  zhongcai: 4, // 仲裁
}

// 影像核查质疑状态映射
export const ISSUES_STATUS_MAP = {
  daitijiao: 102100, // 待提交
  wancheng: 102101, // 完成
  daihecha: 102102, // 待核查
  zhiyi: 102103, // 质疑
  yihuifu: 102104, // 已回复
  hechazhong: 102105, // 核查中
  zhengchang: 102106, // 正常
}
export const ISSUES_STATUS = {
  [ISSUES_STATUS_MAP.daihecha]: {
    label: '待核查',
    class: 'check-wait',
    color: '#6a7a8f',
  },
  [ISSUES_STATUS_MAP.daitijiao]: {
    label: '待提交',
    class: 'pay-wait',
  },
  [ISSUES_STATUS_MAP.hechazhong]: {
    label: '核查中',
    class: 'check-process',
    color: '',
  },
  [ISSUES_STATUS_MAP.wancheng]: {
    label: '完成',
    class: 'complete',
    color: '#94C106',
  },
  [ISSUES_STATUS_MAP.zhiyi]: {
    label: '质疑',
    class: 'cancel',
    color: '#FF4838',
  },
  [ISSUES_STATUS_MAP.yihuifu]: {
    label: '已回复',
    class: 'cancel',
    color: '#FF4838',
  },
}

// 阅片状态映射表
export const TASK_STATUS_MAP = {
  daifenpai: 102301,
  daiyuepian: 102302,
  yuepianzhong: 102303,
  yuepianwancheng: 10230302,
  daizhongcai: 102304,
  zhongcaizhong: 102305,
  zhongcaiwancheng: 10230501,
  daishenhe: 102306,
  shenhezhong: 102307,
  wancheng: 102310,
}
export const TASK_STATUS = {
  [TASK_STATUS_MAP.daifenpai]: {
    label: '待分派',
    class: 'pay-wait',
    color: '#167dff',
  },
  [TASK_STATUS_MAP.daiyuepian]: {
    label: '待阅片',
    class: 'triage-wait',
    color: '#e67125',
  },
  [TASK_STATUS_MAP.yuepianzhong]: {
    label: '阅片中',
    class: 'triage-process',
    color: '#62bbcc',
  },
  [TASK_STATUS_MAP.yuepianwancheng]: {
    label: '完成',
    class: 'complete',
    color: '#8bbc20',
  },
  [TASK_STATUS_MAP.daizhongcai]: {
    label: '待仲裁',
    class: 'consult-wait',
    color: '#6992ff',
  },
  [TASK_STATUS_MAP.zhongcaizhong]: {
    label: '仲裁中',
    class: 'consult-process',
    color: '#9366ff',
  },
  [TASK_STATUS_MAP.zhongcaiwancheng]: {
    label: '完成',
    class: 'complete',
    color: '#8bbc20',
  },
  [TASK_STATUS_MAP.daishenhe]: {
    label: '待审核',
    class: 'check-wait',
    color: '#ff5683',
  },
  [TASK_STATUS_MAP.shenhezhong]: {
    label: '审核中',
    class: 'check-process',
    color: '#0ea3a0',
  },
  [TASK_STATUS_MAP.wancheng]: {
    label: '完成',
    class: 'complete',
    color: '#8bbc20',
  },
}

export const GROUP_CODES = {
  qc: 2104,
  viewer: 2103,
}

export const PRIORITY_CODES: any = {
  102601: {
    label: '不指定',
    color: '#b0b0b0',
  },
  102602: {
    label: '紧急',
    color: '#ef0016',
  },
  102603: {
    label: '重要',
    color: '#ff8f00',
  },
  102604: {
    label: '次要',
    color: '#ff8f00',
  },
  102605: {
    label: '普通',
    color: '#73e06f',
  },
}

export const BASE_STATUS_MAP = {
  daishenhe: 101500,
  tongguo: 101501,
  jujue: 101502,
}
export const BASE_STATUS = {
  [BASE_STATUS_MAP.daishenhe]: {
    color: '#6a7a8f',
  },
  [BASE_STATUS_MAP.tongguo]: {
    color: '#94C106',
  },
  [BASE_STATUS_MAP.jujue]: {
    color: '#FF4838',
  },
}

// 分派

export const FENPAI_CLASS: any = {
  102301: {
    label: '分派',
    color: '#6a7a8f',
  },
  102302: {
    label: '阅片',
    color: '#62bbcc',
  },
  102303: {
    label: '阅片',
    color: '#62bbcc',
  },
  102304: {
    label: '仲裁',
    color: '#FF4838',
  },
  102305: {
    label: '仲裁',
    color: '#FF4838',
  },
  102310: {
    label: '完成',
    color: '#94C106',
  },
}

// 审核状态
export const CHECK_STATUS = {
  daishenhe: 101500,
  qiyong: 101501,
  jujue: 101502,
  jinyong: 101503,
}

// 页面标记
export const PAGE_FLAG = {
  qc: 'QC', // 质控
  img: 'IMG', // 影像
  task: 'TASK', // 任务管理
  query: 'QUERY', // 质疑
  visit: 'VISIT', // 访视
}

/**   各个状态集合  */

export const STATUS_MAP = {
  submitWait: 102200, // '待提交'
  qcCheckWait: 102201, // 待审查
  qcCheckProcess: 102202, // 审查中
  qcIssue: 102203, // 质疑
  qcReview: 102204, // 复审
  qcComplete: 102205, // 完成
  taskWait: 102301, // 待分派
  viewerWait: 102302, // 待阅片
  viewerProcess: 102303, // 阅片中
  judgeWait: 102304, // 待仲裁
  judgeProcess: 102305, // 仲裁中
  taskCheckWait: 102306, // 待审核
  taskCheckProcess: 102307, // 审核中
  confirmWait: 102308, // 待确认
  taskComplete: 102310, // 完成
}

export const codeMaps: { [key: string]: any } = {
  ...ISSUES_STATUS,
  ...TASK_STATUS,
}

export enum genderEnum {
  男 = 100401,
  女,
  未知,
}

export enum EnableEnum {
  '禁用',
  '启用',
  '等待',
}

export const UNPUBLISH = 100901
